package game.web.dao.dto;

import game.web.base.Constants;

public final class ChargeDTO extends BaseDTO{

	private String id = "";
	private String userid = "";
	private int orderstatus = 0;
	private String orderstatusstr = "";
	private double money = 0.00;
	private String orderno = "";
	private String cardno = "";
	private String createtime ="";
	private String createdate="";
	private String updatetime ="";
	private String createip = "";
	private String updateip = "";


	public String getCreatetime() {
		return createtime;
	}

	public void setCreatetime(String createtime) {
		this.setCreatedate(createtime.substring(0, 10));
		this.createtime = createtime;
	}

	public String getUpdatetime() {
		return updatetime;
	}

	public void setUpdatetime(String updatetime) {
		this.updatetime = updatetime;
	}

	public String getCreateip() {
		return createip;
	}

	public void setCreateip(String createip) {
		this.createip = createip;
	}

	public String getUpdateip() {
		return updateip;
	}

	public void setUpdateip(String updateip) {
		this.updateip = updateip;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getUserid() {
		return userid;
	}

	public void setUserid(String userid) {
		this.userid = userid;
	}

	public double getMoney() {
		return money;
	}

	public void setMoney(double money) {
		this.money = money;
	}

	public String getOrderno() {
		return orderno;
	}

	public void setOrderno(String orderno) {
		this.orderno = orderno;
	}

	public String getCardno() {
		return cardno;
	}

	public void setCardno(String cardno) {
		this.cardno = cardno;
	}

	public int getOrderstatus() {
		return orderstatus;
	}

	public void setOrderstatus(int orderstatus) {
		//1=成功，2=失败，3=处理中
		if(orderstatus==1)
			this.setOrderstatusstr(Constants.SUCCESS_NAME);
		else if(orderstatus==2||orderstatus==0)
			this.setOrderstatusstr(Constants.FAILURE_NAME);
		else if(orderstatus==3)
			this.setOrderstatusstr(Constants.PROCESS_NAME);
		else
			this.setOrderstatusstr(Constants.UNKNOW_NAME);
		
		this.orderstatus = orderstatus;
	}

	public String getCreatedate() {
		return createdate;
	}

	public void setCreatedate(String createdate) {
		this.createdate = createdate;
	}

	public String getOrderstatusstr() {
		return orderstatusstr;
	}

	public void setOrderstatusstr(String orderstatusstr) {
		this.orderstatusstr = orderstatusstr;
	}

}
